function outputstr = print_results_of_pathway_to_results_windows( numberOfPathway, numberOfsecondPathway, analyzedPathIndex)%numberOfPathway, pathway)
analyzedPathways = evalin('base','analyzedPathways');

outputstr = '';
 if exist('tmpDiary.txt', 'file') == 2
     delete ('tmpDiary.txt')
 end
diary('tmpDiary.txt');
diary on
disp('#############  RESULTS ####################')
disp('PRIMARY PATHWAY INDEX:');
disp(analyzedPathways(analyzedPathIndex).NUMBER_OF_PATHWAY)

if any(strcmp('NUMBER_OF_PATHWAY_PROD',fieldnames(analyzedPathways(analyzedPathIndex))))
    disp('SECONDARY PATHWAY INDEX:');
    disp(analyzedPathways(analyzedPathIndex).NUMBER_OF_PATHWAY_PROD)
end

disp('PATHWAY:');
disp(char(analyzedPathways(analyzedPathIndex).PATHWAY))

if any(strcmp('PATHWAY_PROD',fieldnames(analyzedPathways(analyzedPathIndex))))
    disp('SECONDARY PATHWAY:');
    char(analyzedPathways(analyzedPathIndex).PATHWAY_PROD)
end

disp('STATISTICS:');
disp(analyzedPathways(analyzedPathIndex).STATISTICS)

if any(strcmp('STATISTICS_PROD',fieldnames(analyzedPathways(analyzedPathIndex))))
    disp('SECONDARY STATISTICS:');
    disp(analyzedPathways(analyzedPathIndex).STATISTICS_PROD)
end

disp('POOL METABOLITES:');
disp(analyzedPathways(analyzedPathIndex).POOL_METABOLITES)
if any(strcmp('POOL_METABOLITES_PROD',fieldnames(analyzedPathways(analyzedPathIndex))))
    disp(analyzedPathways(analyzedPathIndex).POOL_METABOLITES_PROD)
end

disp('ORGANISM PATHWAYS:');
disp(analyzedPathways(analyzedPathIndex).ORGANISM_PATHWAYS)
if any(strcmp('ORGANISM_PATHWAYS_PROD',fieldnames(analyzedPathways(analyzedPathIndex))))
    disp(analyzedPathways(analyzedPathIndex).ORGANISM_PATHWAYS_PROD)
end

disp('WEIGHTS:');
columnNames = evalin('base','columnNames');
dataValues = evalin('base', 'dataValues');
names = [];
data = ['     '];
for c = 1: length(columnNames)
  names = [names, strtrim(columnNames{c}) ' | '];  
end
disp(names)
for c = 1: length(dataValues)
  data = [data, num2str(dataValues(c)) '    |     '];  
end
disp(data)
diary off
outputstr = fileread('tmpDiary.txt');
delete ('tmpDiary.txt')
end